/*
 * TranscriptParser.h
 *
 *  Created on: Apr 15, 2012
 *      Author: desilva
 */

#ifndef TRANSCRIPTPARSER_H_
#define TRANSCRIPTPARSER_H_

#include <algorithm>
#include <cstdlib>
#include <cstring>
#include <string>
#include <vector>

#include "Course.h"

/**
 * The interface for the actual instance of the transcript parser.
 */
class TranscriptParser
{
public:
    /**
     * This type describes the status of the degree program form.
     */
    enum DegreeProgramFormStatus {NOT_SUBMITTED,
                                  SUBMITTED_TO_ADVISOR,
                                  SUBMITTED_TO_DEPT,
                                  SUBMITTED_TO_GRAD_SCHOOL,
                                  APPROVED
    };

    /**
     * A type that describes which plan the student is following.
     * <ul>
     *  <li>PLAN_UNKNOWN - the plan that is being followed has not been
     *      entered</li>
     *  <li>PLAN_A - The student is completing a plan A masters degree
     *      (thesis)</li>
     *  <li>PLAN_B - The student is completing a plan B masters degree
     *      (project)</li>
     *  <li>PLAN_C - The student is completing a plan C masters degree
     *      (coursework)</li>
     *  <li>NO_PLAN - The student is not in the M.S. program (they are MCS
     *          students, for example)</li>
     * </ul>
     */
    enum Plan {PLAN_UNKNOWN, PLAN_A, PLAN_B, PLAN_C, NO_PLAN};

public:
    //-------------------------------------------------------------------------
    //From the student's transcript
    //-------------------------------------------------------------------------
    /**
     * Gets the student's name.
     * @return  a vector of name strings for the student.  The last position is
     *      the last name (surname or family name) of the student while the
     *      first position is the first name of the student.
     */
    virtual void getStudentName(std::vector<std::string>* name)=0;

    /**
     * Gets the student's ID number.
     * @return  the id number of the student as a string.
     */
    virtual std::string getStudentId()=0;


    /**
     * Gets the string representing which program the student belongs to.
     * <br />
     * <i>Example:</i> College of Sci &amp; Engineering
     * @return  the name of the program the student is in.
     */
    virtual std::string getDegreeProgram()=0;

    /**
     * Gets the string representing which plan the student belongs to.
     * <br />
     * <i>Examples:</i>
     * <ul>
     *      <li>Computer Science Ph D Major</li>
     *      <li>Computer Science M S Major</li>
     * </ul>
     * @return  the name of the plan the student is in.
     */
    virtual std::string getDegreePlan()=0;

    /**
     * Gets the name of the degree the student is seeking.
     * <br />
     * <i>Examples:</i>
     * <ul>
     *      <li>Master of Science</li>
     *      <li>Doctor of Philosophy</li>
     * </ul>
     * @return  the name of the degree the student is seeking.
     */
    virtual std::string getDegreeName()=0;

    /**
     * Gets the name of the name of the student's advisor.
     * <br />
     * <i>Examples:</i>
     * <ul>
     *      <li>Meyer,Gary</li>
     *      <li>Interrante,Victoria L</li>
     *      <li>Heimdahl,Mats P E</li>
     * </ul>
     * @return  the name of the student's advisor.
     */
    virtual std::string getDegreeAdvisor()=0;

    /**
     * Get a list of courses that the student has taken or is enrolled in.
     * @return  courseList  a list of courses that the student has taken.  These
     *      may not be in any particular order.
     */
    virtual void getCourses(std::vector<Course>* courseList)=0;


    //-------------------------------------------------------------------------
    //From PeopleSoft (UMReports)
    //------------------------------------------------------------------------
    /**
     * Gets the date the student was admitted to the degree program.
     * @return  the date the student was admitted in the form yyyymmdd
     */
    virtual std::string getDegreeAdmissionDate()=0;

    /**
     * Gets the term and year the student started the degree program.
     * @return  the term and year the student started the program as a pair.
     *      The first element is the term and the second is the semester.
     */
    virtual std::pair<std::string, std::string> getDegreeStartSemester()=0;


    /**
     * Gets a list of all the committee members from the computer science
     * departmental database.
     * @return  a list of all of the committee members for the student.
     */
    virtual std::vector<std::string> getCommitteMembers()=0;


    //-------------------------------------------------------------------------
    //From Departmental Database
    //------------------------------------------------------------------------
    /**
     * Gets the current status of the degree program form and the date of the
     *      last update
     * @return  the status of the degree program form and the date the status
     *      was applied (the second item in the pair).  The date is in the form
     *      yyyymmdd.  When the value is NOT_SUBMITTED, the date is irrelevant,
     *      so no guarantees are given as to what is in the string.
     */
    virtual std::pair<DegreeProgramFormStatus, std::string>
        getDegreeProgramFormStatus()=0;


    /**
     * Gets the information about the plan the student is following.
     * @return  which plan the CS student is working to complete.
     */
    virtual Plan getPlanInfo()=0;
};

#endif /* TRANSCRIPTPARSER_H_ */
